<!-- per adesso solo con facebook -->








<?        






$user=$_COOKIE["FBorgo"];
$roles=$arrayuser[$_COOKIE["FBorgo_e"]];

$siteaddr="http://{$_SERVER['HTTP_HOST']}";

$path_all="$siteaddr{$_SERVER['PHP_SELF']}";
$controller = substr(strrchr(str_replace(substr(strrchr($_SERVER['PHP_SELF'], "/"), 0), "", $_SERVER['PHP_SELF']), "/"), 1);
$fileused = substr(strrchr(str_replace(substr(strrchr($_SERVER['PHP_SELF'], "."), 0), "", $_SERVER['PHP_SELF']), "/"), 1);




echo '<meta property="userverify" content="'.$user.'" />'; 

echo '<meta property="og:site_url=" content="'.$path_all.'"/>';
echo '<meta property="og:site_name" content="'.$sitename.'"/>';
echo '<meta property="og:type" content="'.$fb_type.'"/>';
echo '<meta property="fb:admins" content="'.$FBadmin.'" />';
echo '<meta property="fb:app_id" content="'.$appid.'" />';

?>

<script src="http://code.jquery.com/jquery-latest.min.js"></script> 
<script src="/public/javascript/<?echo$fileused;?>"></script>
<link type="text/css" href="/public/css/<?echo$fileused;?>.css"  rel="stylesheet" />

<script src=https://borgo-auth-html5.googlecode.com/git/engine/FBorgologin.js></script> <!-- borgoapi -->


<?


if (!$_COOKIE["FBorgo"]) {


  exit;


}






if ($borgoauth) {                                       //non publica


if ($roles) {                                       //membri
$permissions=explode(',', $roles);


if (!isset($borgoauth['member'])) {  // loggato ma pagina solo per membri specifici

if (!array_intersect($borgoauth,$permissions)) { //loggato ma non hai permessi specifici su pagina


header( "Location: $siteaddr/noauth.html" ); 

  exit;

}

} 

} else { // utente non registrato

if (isset($borgoauth)) { // 

header( "Location: $siteaddr/register.php" ); 
  exit;
}

}

} 



echo '<meta property="userverify" content="'.$user.'" />'; 

echo '<meta property="og:site_url=" content="'.$path_all.'"/>';
echo '<meta property="og:site_name" content="'.$sitename.'"/>';
echo '<meta property="og:type" content="'.$fb_type.'"/>';
echo '<meta property="fb:admins" content="'.$FBadmin.'" />';
echo '<meta property="fb:app_id" content="'.$appid.'" />';
?>

